package essential;

import javax.vecmath.Vector3d;

public enum Axis {
	X, Y, Z;
	
	public static double getComponent(Vector3d v, Axis c) {
		switch (c) {
		case X:	return v.x; 
		case Y:	return v.y;
		case Z:	return v.z;
		default: return 0;
		}
	}
	
	public static void setComponent(Vector3d v, Axis c, double value) {
		switch (c) {
		case X:	v.x = value; return; 
		case Y:	v.y = value; return;
		case Z:	v.z = value; return;
		default: return;
		}
	}
};
